package com.nzx.business.demo.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 类描述：试图访问控制器
 *
 * @author niezhuxe
 * @date 2021/11/3 23:59
 */
@Controller
@RequestMapping("/api/view")
@Api(tags = "试图跳转控制接口")
public class ViewController {


    @GetMapping("/index")
    @ApiOperation("首页跳转路径")
    public String index(){

        return "index";
    }

    @GetMapping("/404")
    @ApiOperation("Not Found !")
    public String notFound(){

        return "404";
    }

    @GetMapping("/500")
    @ApiOperation("错误")
    public String error(){

        return "500";
    }

    @GetMapping("/login")
    @ApiOperation("登录")
    public String login(){

        return "view/login";
    }
}
